package logmanager.view;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JTextField;

//classe d'action de recherche
public class ActionSearch implements MouseListener {
	public PrincipalView pv;
	public JTextField textRecherche;

	public ActionSearch(PrincipalView pv, JTextField textRecherche) {
		super();
		this.pv = pv;
		this.textRecherche = textRecherche;
	}

	public void mouseClicked(MouseEvent e) {
		pv.oldFilterValue.set(pv.tables.getSelectedIndex(), textRecherche.getText().trim().toLowerCase());
		pv.search(textRecherche.getText().trim().toLowerCase());
	}

	public void mouseEntered(MouseEvent e) {		
	}

	public void mouseExited(MouseEvent e) {		
	}

	public void mousePressed(MouseEvent e) {		
	}

	public void mouseReleased(MouseEvent e) {		
	}
}
